//q2.cpp
//This program capture an array and print the index of the lowest number
//
//Binyamin 11 jan 2018
//===============================================================

#include<iostream>

using namespace std;

const int SIZE = 12;

//1. prompt the user for numbers
//2. capture the numbers into array
//3. print the index of the lowest number
int main()
{
	int i; // i - looper.
	int arr[SIZE]; // User input.
	int min; // min - minimal current number.
	cout << "Please enter twelve numbers:" << endl;
	cin >> arr[0];
	min = arr[0];
	for(i=1;i<SIZE;i++)
	{
		cin >> arr[i];
		if(min>arr[i]) min = arr[i];
	}
	cout << "The minimal number is located at ";
	for(i=0;i<SIZE;i++)
		if(arr[i]==min) cout << i << ' ';
	cout << endl;
	return 0;
}
//output
//Please enter twelve numbers:
//6 14 12 14 12 4 14 6 4 12 4 14
//The minimal number is located at 5 8 10 
